﻿using System;
using System.Collections.Generic;
using System.Linq; 
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;

namespace MShop.Core.Domain
{
    [MetadataType(typeof(HelpCategory_Validation))]
    public partial class HelpCategory
    {
        public HelpCategory()
        {
            this.Status = 1;
            this.Created = DateTime.Now;
            this.Sort = 1;
           
        }
    }

    internal partial class HelpCategory_Validation
    {
        [DisplayName("帮助分类")]
        [Required(ErrorMessage = "帮助分类名称不能为空")]
        public string Name { get; set; }
        [DisplayName("分类排序")]
        [Required(ErrorMessage = "帮助分类排序不能为空")]
        [Range(1, 1000, ErrorMessage = "请输入排序的整数(1-1000)")]
        public int Sort { get; set; }

        [UIHint("img")]
        [DisplayName("分类图标")]     
        public string Icon { get; set; }

        [DisplayName("首页显示")]
        public bool IsMain { get; set; }
    }
}